package org.aurora.remote.protocol;

public enum RemoteCommandType {
    REQUEST((byte) 1), RESPONSE((byte) 2);

    private final byte code;

    RemoteCommandType(byte code) {
        this.code = code;
    }

    public byte getCode() {
        return code;
    }

    public static RemoteCommandType getByCode(byte code) {
        switch (code) {
            case 1: {
                return REQUEST;
            }
            case 2: {
                return RESPONSE;
            }
            default: {
                return null;
            }
        }
    }
}
